#include <stdio.h>
#include <stdlib.h>
#define LEN 100
int main()
{
   int compress(char array[], int count[]);
   char array[LEN];
   int count[LEN];
   int i;
   int tail; //count数组的有效最末下标
  while(scanf("%s",array)!=-1)
   {
      tail = compress(array, count);
      for(i=0;i<tail;i++)
        i<tail-1 ? printf("%d ",count[i]) : printf("%d\n",count[i]);
   }
   return 0;
}
int compress(char array[], int count[])
{
//start
    for(int i=0; i<LEN; i++) count[i] = 1;
    int cnt=0, cntn;
    for(int i=0; array[i]; i++)
    {
        if(array[i] != array[i+1]) cnt++;
        else count[cnt]++;
    }
    return cnt;
//end
}